<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->



<!-- File list -->

<h1>Files</h1>
<ul>

	<li>
		<a href="../files/Compiler.html">Compiler.lua</a>
	</li>

	<li><strong>Editor.lua</strong></li>
	
	<li>
		<a href="../files/Instance.html">Instance.lua</a>
	</li>

	<li>
		<a href="../files/Libraries.html">Libraries.lua</a>
	</li>

	<li>
		<a href="../files/Permissions.html">Permissions.lua</a>
	</li>

	<li>
		<a href="../files/Preprocessor.html">Preprocessor.lua</a>
	</li>

	<li>
		<a href="../files/SFLib.html">SFLib.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/ents.html">libs_cl/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/screen.html">libs_cl/screen.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/builtins.html">libs_sh/builtins.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/files.html">libs_sh/files.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/find.html">libs_sh/find.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/time.html">libs_sh/time.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/trace.html">libs_sh/trace.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/ents.html">libs_sv/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/wire.html">libs_sv/wire.lua</a>
	</li>

	<li>
		<a href="../files/reload.html">reload.lua</a>
	</li>

</ul>






</div> <!-- id="navigation" -->

<div id="content">

<h1>File <code>Editor.lua</code></h1>







<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.BuildIncludesTable">SF.Editor.BuildIncludesTable</a>&nbsp;(maincode, codename)</td>
	<td class="summary">(Client) Builds a table for the compiler to use </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.getCode">SF.Editor.getCode</a>&nbsp;()</td>
	<td class="summary">(Client) Gets the current code inside of the editor </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.getOpenFile">SF.Editor.getOpenFile</a>&nbsp;()</td>
	<td class="summary">(Client) Gets the filename of the currently selected file.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.init">SF.Editor.init</a>&nbsp;()</td>
	<td class="summary">(Client) Intializes the editor, if not initialized already </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.isInitialized">SF.Editor.isInitialized</a>&nbsp;()</td>
	<td class="summary">(Client) Returns true if initialized </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Editor.open">SF.Editor.open</a>&nbsp;()</td>
	<td class="summary">(Client) Opens the editor.</td>
	</tr>

</table>




<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#Includes table">Includes table</a></td>
	<td class="summary">Includes table </td>
	</tr>

</table>



<br/>
<br/>




<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="SF.Editor.BuildIncludesTable"></a><strong>SF.Editor.BuildIncludesTable</strong>&nbsp;(maincode, codename)</dt>
<dd>
(Client) Builds a table for the compiler to use


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>maincode</em></code>: The source code for the main chunk
	</li>
	
	<li>
	  <code><em>codename</em></code>: The name of the main chunk
	</li>
	
</ul>






<h3>Return values:</h3>
<ol>
	
	<li>True if ok, false if a file was missing</li>
	
	<li>A table with mainfile = codename and files = a table of filenames and their contents, or the missing file path.</li>
	
</ol>



</dd>




<dt><a name="SF.Editor.getCode"></a><strong>SF.Editor.getCode</strong>&nbsp;()</dt>
<dd>
(Client) Gets the current code inside of the editor







<h3>Return value:</h3>
<ul>Code string or nil if not initialized</ul>



</dd>




<dt><a name="SF.Editor.getOpenFile"></a><strong>SF.Editor.getOpenFile</strong>&nbsp;()</dt>
<dd>
(Client) Gets the filename of the currently selected file.







<h3>Return value:</h3>
<ul>The open file or nil if no files opened or not initialized</ul>



</dd>




<dt><a name="SF.Editor.init"></a><strong>SF.Editor.init</strong>&nbsp;()</dt>
<dd>
(Client) Intializes the editor, if not initialized already









</dd>




<dt><a name="SF.Editor.isInitialized"></a><strong>SF.Editor.isInitialized</strong>&nbsp;()</dt>
<dd>
(Client) Returns true if initialized









</dd>




<dt><a name="SF.Editor.open"></a><strong>SF.Editor.open</strong>&nbsp;()</dt>
<dd>
(Client) Opens the editor. Initializes it first if needed.









</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="Includes table"></a><strong>Includes table</strong></dt>
<dd>Includes table<br /><br />


<h3>Fields:</h3>
<ul>
	
	<li>
	  <code><em>mainfile</em></code>: Main file
	</li>
	
	<li>
	  <code><em>files</em></code>: filename : file contents pairs
	</li>
	
</ul>


</dd>


</dl>




</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
